<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link href="/lib/layui/css/layui.css" rel="stylesheet"/>
    <link href="/css/common.css" rel="stylesheet"/>
    <title>分页查询字典值</title>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">
                    <form class="layui-form">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <button class="layui-btn addBtn" data-url="/system/dictcontent/dictContentEdit.html">添加</button>
                                <button class="layui-btn layui-btn-danger deleteBtn" data-url="/system/dictcontent/remove.do">删除</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="layui-card-body">
                    <table class="layui-hide" id="layuiTable" lay-filter="tableTool"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="tableToolBar">
    <a class="layui-btn layui-btn-xs" lay-event="edit" data-url="/system/dictcontent/dictContentEdit.html">编辑</a>
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete" data-url="/system/dictcontent/remove.do">删除</a>
</script>
<script src="/lib/layui/layui.all.js" charset="utf-8"></script>
<script src="/script/common.js" charset="utf-8"></script>
<script>
    var dictCode = getRequestParams('code');

    layui.use(['baseUtil'], function () {
        var $ = layui.jquery,
            baseUtil = layui.baseUtil;

        $('.addBtn').attr('data-param', 'dictCode=' + dictCode);

        var url = '/system/dictcontent/findPage.do?dictCode=' + dictCode;
        var cols = [
            { type: 'checkbox', align: 'center', fixed: 'left' },
            { type: 'numbers', title: '序号', align: 'center', fixed: 'left' },
            { field: 'name', title: '字典键', align: 'center' },
            { field: 'value', title: '字典值', align: 'center' },
            { field: 'dictCode', title: '字典码', align: 'center' },
            { field: 'createTime', title: '创建时间', align: 'center', width: 180 },
            { title: '操作', align: 'center', fixed: 'right', width: 150, toolbar: '#tableToolBar' }
        ];
        baseUtil.initPage(url, cols);
    });
</script>
</body>
</html>
